Skip to content

Conversation

@BassemHalim
Copy link

Enabling lakeformation governance for a Feature Group following this blog requires multiple steps. This PR is to simplify this process.

Description of changes:

  • Add enable_lake_formation() method to enable lf for an existing Feature Group
  • Add enable_lake_formation flag to the .create() method to enable lf for a feature group being created.
  • Add helper methods for all the phases required to enable lf:
  1. register the s3 location as a Lakeformation managed resource
  2. grant the offline role permissions to write to the glue table
  3. revoke IAMAllowedPrincipals

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

- Add _s3_uri_to_arn() method to convert S3 URIs to ARN format
- Add _get_lake_formation_client() method to create Lake Formation client instances
- Add _register_s3_with_lake_formation() method to register S3 locations with Lake Formation
- Add _revoke_iam_allowed_principal() method to revoke IAMAllowedPrincipal permissions from Glue tables
- Add _grant_lake_formation_permissions() method to grant role-based permissions on Glue tables
- Add enable_lake_formation() public method to orchestrate Lake Formation governance setup
- Implement comprehensive error handling for Lake Formation API calls with graceful handling of already-registered resources
- Support both service-linked role and custom IAM role configurations for S3 registration
- Enable automated governance workflow for Feature Group offline stores with proper logging and validation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant